During the drilling of a wellbore, various fluids are used in the well for a variety of functions. The fluids may be circulated through a drill pipe and drill bit into the wellbore, and then may subsequently flow upward through wellbore to the surface. During this circulation, a drilling fluid may act to remove drill cuttings from the bottom of the hole to the surface, to suspend cuttings and weighting material when circulation is interrupted, to control subsurface pressures, to maintain the integrity of the wellbore until the well section is cased and cemented, to isolate the fluids from the formation by providing sufficient hydrostatic pressure to prevent the ingress of formation fluids into the wellbore, to cool and lubricate the drill string and bit, and/or to maximize penetration rate.
Once injected, wellbore fluids may be subjected to various contaminants, including drill cuttings, mud residues, and various connate fluids. The presence of contaminants and residues in the wellbore may also be composed of chemical phases that are distinct from the injected fluid and may form emulsions or sludge when admixture occurs. Emulsions produced may be detrimental to wellbore operations, and can result in formation damage, adverse changes in fluid rheology, or introduce additional impurities into produced hydrocarbons. When the wellbore fluid is a fracturing fluid, viscous emulsions may form when oils are contacted downhole, which may inhibit the ability to pump the fluids further into a formation, increasing the energy required and raising operating costs.